home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / video / zapem-0.000 / zapem-0 / zapem / display.cc < prev    next >
C/C++ Source or Header  |  1995-06-03  |  775b  |  38 lines

  1. ////////////////////////////////////////////////////////////////////////////
  2. // Displays the vscreen to the crt, in a separate file to allow possible
  3. // X windows port!
  4. ////////////////////////////////////////////////////////////////////////////
  5.  
  6. ////////////////////////////////////////////////////////////////////////////
  7. // Linux SVGAlib displayer
  8. ////////////////////////////////////////////////////////////////////////////
  9. #include <vga.h>
  10. #include "btypes.h"
  11. #include "palette.h"
  12. extern "C" {
  13. #include "gamelib.h"
  14. }
  15.  
  16. void
  17. display(byte *vscreen)
  18. {
  19. #ifdef FAST
  20.     waitvbl();
  21. #endif
  22.     screencopy( vscreen, graph_mem);
  23. }
  24.  
  25. void
  26. use_palette(Palette& p)
  27. {
  28.     int r,g,b;
  29.     for(int i=0;i<256;i++)
  30.     {
  31.         if(p.getAlloc(i))
  32.         {
  33.             p.getData(i,r,g,b);
  34.             vga_setpalette(i,r,g,b);
  35.         }
  36.     }
  37. }
  38.